import request from '@/utils/request.js'

export default {
  // 审批任务列表
  list: function(query, pageReq) {
    return request({
      url: '/todo/approveList',
      method: 'post',
      data: query,
      params: pageReq
    })
  },
  // 查询详情
  detail: function(id) {
    return request({
      url: `/apply/${id}`,
      method: 'get'
    })
  },
  // 同意审批
  approve: function(params) {
    return request({
      url: '/todo/approveTask',
      method: 'post',
      data: params
    })
  },
  // 拒绝审批
  reject: function(params) {
    return request({
      url: '/todo/rejectTask',
      method: 'post',
      data: params
    })
  },
}

